<?php session_start();
if($_SESSION['userid']=="") 
{
	$_SESSION['return_url']=curPageURL();
	echo "<script>window.location = '".get_bloginfo('siteurl','display')."/sign-in/';</script>";	
	
}

/**
 * The template for displaying all pages.
 *
 * This is the template that displays all pages by default.
 * Please note that this is the WordPress construct of pages
 * and that other 'pages' on your WordPress site will use a
 * different template.
 *
 * @package WordPress
 * @subpackage Twenty_Eleven
 * @since Twenty Eleven 1.0
 */

include('header.php');
?>
<?php 
global $wpdb; 

 	 $idal = $_GET['id'];
	 $_SESSION['IDs']=  $idal;
  	$results = $wpdb->get_results(" SELECT *  FROM  resume WHERE  resume.Re_ID =  '".$idal."' 
                                                                                    ");
											
												
	 foreach($results as $reg)
		 {
			  $id_top = $reg->Re_ID;
			
			 }												
			$_SESSION['location'] = $reg->Province;																	
		$resultsc = $wpdb->get_results("SELECT  CategoryName FROM jobcategory  ");
		$resultslw = $wpdb->get_results("SELECT  Location FROM location  "); 
 ?>

 
<?php 
//============== repare data ========================
$sql_ds_workstyle=sql("select * from workstyle");
$workstyle_option=' <option value="0">'.$can_Reg_resitext .'</option>';
while($rows_workstyle=mysql_fetch_object($sql_ds_workstyle))
{
	$workstyle_option.='<option value="'.$rows_workstyle->workstyle.'">'.my_translate("workstyle","workstyle",$rows_workstyle->workstyle).'</option>';
} 


$sql_ds_category = sql("SELECT  CategoryName FROM jobcategory  ");
$category_option='<option value="">'. $can_Reg_resitext .'</option>';
while($rows_category=mysql_fetch_object($sql_ds_category))
{
	$category_option.='<option value="'.$rows_category->CategoryName.'">'.$rows_category->CategoryName.'</option>';
} 


$year_option=  '<option value="2012">2012</option><option value="2011">2011</option><option value="2010">2010</option><option value="2009">2009</option><option value="2008">2008</option><option value="2007">2007</option><option value="2006">2006</option><option value="2005">2005</option><option value="2004">2004</option><option value="2003">2003</option><option value="2002">2002</option><option value="2001">2001</option><option value="2000">2000</option><option value="1999">1999</option><option value="1998">1998</option><option value="1997">1997</option><option value="1996">1996</option><option value="1995">1995</option><option value="1994">1994</option><option value="1993">1993</option><option value="1992">1992</option><option value="1991">1991</option><option value="1990">1990</option><option value="1989">1989</option><option value="1988">1988</option><option value="1987">1987</option><option value="1986">1986</option><option value="1985">1985</option><option value="1984">1984</option><option value="1983">1983</option><option value="1982">1982</option><option value="1981">1981</option><option value="1980">1980</option>';
$month_option='<option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option> <option value="6">6</option><option value="7">7</option><option value="8">8</option><option value="9">9</option><option value="10">10</option><option value="11">11</option><option value="12">12</option>';

//===================================================
                	global $wpdb;
					 if (isset($_POST['submit']) )
						{
							
										$filename1 = $reg->CV;
										if($_FILES["file"]["name"]!="")
										{
											if($filename1 =="")
											{	
												
												$rand=rand(0,9).rand(0,9).rand(0,9).rand(0,9).rand(0,9).rand(0,9).rand(0,9).rand(0,9).rand(0,9).rand(0,9);
												$email = $_SESSION['userid'];
												$name_file = change_code($_FILES["file"]["name"]);
												$filename1=$rand.'_'.$email.'_'.$name_file;
											}else{
												@unlink('upload/canprofile/'.$filename1);
												$str = explode("_",$filename1);
												$name_file = change_code($_FILES["file"]["name"]);
												$filename1 = $str[0].'_'.$str[1].'_'.$name_file;
											}
										}
											$resumetitle = $_POST["resumetitle"];
											$presalary = $_POST["presalary"];
											$canname = $_POST["canname"];
											$gender = $_POST["gender"];
											
											$day2 = $_POST["day2"];
											$month2 = $_POST["month2"];
											$year2 = $_POST["year2"];
											$birthday = $year2.'-'.$month2.'-'.$day2;
											$location = $_POST["location"];
											$address = $_POST["address"];
											$telp = $_POST["telp"];
											$email = $_SESSION['userid'];
											
											
											
											
											$skillsheet = $_POST["skillsheet"];
											$comname = $_POST["comname"];
											
											$month3 = $_POST["month3"];
											$year3 = $_POST["year3"];
											$startdate = $year3.'-'.$month3 ;
											$month4 = $_POST["month4"];
											$year4 = $_POST["year4"];
											$enddate = $year4.'-'.$month4 ;
											
											$jobcate = $_POST["jobcate"];
											$workstyle = $_POST["workstyle"];
											$detail = $_POST["detail"];
											$selfpro = $_POST["selfpro"];
											$detail = $_POST["detail"];
											$selfpro = $_POST["selfpro"];
											$scount = $_POST["scount"];
											$file1 = $_POST["file1"];
											
								if($_FILES["file"]["name"]!="" && ($_FILES["file"]["type"] == "application/msword")|| ($_FILES["file"]["type"] == "application/pdf") || ($_FILES["file"]["type"] == "application/vnd.openxmlformats-officedocument.wordprocessingml.document"))
								{
											
												$in = $wpdb->query("
												UPDATE resume set `Title` = '".$resumetitle."', `PreferredSalary` = '".$presalary."', `Name` = '".$canname."',
												`Gender` = '".$gender."',`BirthDay` = '".$birthday."',`Province` ='".$location."', 
												`Address` = '".$address."',`Telephone` = '".$telp."',
												`SkillSheet` = '".$skillsheet."',
												`SelfPromotion` = '".$selfpro."',`ScountMail` = '".$scount."',`CV` = '".$filename1."',`LastUpdate` = CURDATE(),
												`Status` = 'pending'
												WHERE Re_ID = '".$_SESSION['IDs']."' and Email = '".$_SESSION['userid']."'
												");
									}else{ 
												$in = $wpdb->query("
												UPDATE resume set `Title` = '".$resumetitle."', `PreferredSalary` = '".$presalary."', `Name` = '".$canname."',
												`Gender` = '".$gender."',`BirthDay` = '".$birthday."',`Province` ='".$location."', 
												`Address` = '".$address."',`Telephone` = '".$telp."',
												`SkillSheet` = '".$skillsheet."',
												`SelfPromotion` = '".$selfpro."',`ScountMail` = '".$scount."',`LastUpdate` = CURDATE(),
												`Status` = 'pending'
												WHERE Re_ID = '".$_SESSION['IDs']."' and Email = '".$_SESSION['userid']."'
												");
									}			
										
											
										
											
											if($in==0 || $in==false)
											{
												echo "<script>alert($fileName)</script>";
												echo "<script>alert('Sorry we have problem right now, please try later')</script>";
												echo "<script>window.location = 'http://www.itworks.vn/index.php/';</script>";	
												exit();
											}
											else {
												
												//=========== insert the Experience ================
												
												$re_id=$_GET['id'];
												sql("delete from experience where Re_ID='".$re_id."'");
												
												for($i=0;$i<(int)$_POST['i']+1;$i++)
												{	$comn='comname'.$i;
													//$string="insert into experience(Re_ID,CompanyName,StartDate,EndDate,JobCategory,Workstyle,Detail) value(".$re_id.",'".$_POST['comname'.$i]."','".$_POST['startdate'.$i]."','".$_POST['enddate'.$i]."','".$_POST['jobcat'.$i]."','".$_POST['workstyle'.$i]."','".$_POST['detail'.$i]."')";
														
													if($_POST['comname'.$i]!="")
													{ 
														
														$string="insert into experience(Re_ID,CompanyName,StartDate,EndDate,JobCategory,Workstyle,Detail) value(".$re_id.",'".$_POST['comname'.$i]."','".$_POST['start_month'.$i]."/".$_POST['start_year'.$i]."','".$_POST['end_month'.$i]."/".$_POST['end_year'.$i]."','".$_POST['jobcat'.$i]."','".$_POST['workstyle'.$i]."','".$_POST['detail'.$i]."')";
														if(!sql($string))
														{
															echo'<script> alert("error"); </script>';
														}
													}
													
												}
												
												//========== insert the Language ==================
												sql("delete from language where Re_ID='".$re_id."'");
												for($j=0;$j< (int)$_POST['j']+1;$j++)
												{		
													if($_POST['language'.$j]!="")
													{ 
														
														$string="insert into language(Re_ID,Name,Level) value(".$re_id.",'".$_POST['language'.$j]."','".$_POST['language_level'.$j]."')";
														if(!sql($string))
														{
															echo'<script> alert("error"); </script>';
														}
													}
													
												}
												//======== insert the degree ========================
												sql("delete from degree where Re_ID='".$re_id."'");
												for($k=0;$k< (int)$_POST['l']+1;$k++)
												{		
													if($_POST['schoolname'.$k]!="")
													{ 
														
														$string="insert into degree(Re_ID,schoolname,faculty,graduateyear,degree) value(".$re_id.",'".$_POST['schoolname'.$k]."','".$_POST['faculty'.$k]."','".$_POST['graduateyear'.$k]."','".$_POST['degree'.$k]."')";
														if(!sql($string))
														{
															echo'<script> alert("error"); </script>';
														}
													}
													
												}
												
												// =================== upload file ==========================
			
												if ((($_FILES["file"]["type"] == "application/msword")
												|| ($_FILES["file"]["type"] == "application/pdf")
												|| ($_FILES["file"]["type"] == "application/vnd.openxmlformats-officedocument.wordprocessingml.document")
												)
												&& ($_FILES["file"]["size"] < 1000000))
												   {
													 
													if ($_FILES["file"]["error"] > 0)
													{
														
														$flagupload="invalid_upload 1";
													}
													else
													{
														if (file_exists("upload/canprofile/" . $_FILES["file"]["type"]))
														  {
															  $flagupload="already_exist";
														  }
														else
														  {
															  move_uploaded_file($_FILES["file"]["tmp_name"],
															  "upload/canprofile/" .$filename1);
															  $flagupload="success_upload";
														  }
														}
														
													}
												else
													{
														$flagupload="invalid_upload 2";
													}
												//========================= end upload file ====================
			
												echo "<script>window.location = 'http://www.itworks.vn/detail-resume/?id=".$_GET['id']."';</script>";
												exit();		
											}
						
			}
			
     ?>
<script>
     
function validateForm(){
		
				
				var resumetitle =document.forms["formResume"]["resumetitle"].value;
				var presalary =document.forms["formResume"]["presalary"].value;
				var canname=document.forms["formResume"]["canname"].value;
				
				var gender =document.forms["formResume"]["gender"].checked;
				var address =document.forms["formResume"]["address"].value;
				var telp=document.forms["formResume"]["telp"].value;
				
				var skillsheet =document.forms["formResume"]["skillsheet"].value;
				var selfpro =document.forms["formResume"]["selfpro"].value;
				var scount=document.forms["formResume"]["scount"].checked;
				
				var fileupload  =document.forms["formResume"]["file"].value;
				var afileupload = fileupload.split('.');
				
				 if (afileupload[afileupload.length-1] != '')
				  {
						if(afileupload[afileupload.length-1] == 'doc' || afileupload[afileupload.length-1] == 'docx' || afileupload[afileupload.length-1] == 'pdf') 
						{	
							
													
						}
						else
						{	
							alert(" Please attach your file in .doc, .docx, .pdf. Maximum 2 MB ");					
							return false;
						}
				 		
				  }
				
				if (resumetitle==null || resumetitle=="")
				  {
						  alert("<? echo $can_create_massege_Title ?>");
							document.forms["formResume"]["resumetitle"].focus();
						  return false;
				 
				  }
				  if (presalary==null || presalary=="")
				  {
						  alert("<? echo $can_create_massege_Salary ?>");
							document.forms["formResume"]["presalary"].focus();
						  return false;
				 
				  }
				  if (canname==null || canname=="")
				  {
						  alert("<? echo $can_create_massege_Name ?>");
							document.forms["formResume"]["canname"].focus();
						  return false;
				 
				  }
				  if (gender== false)
				  {
						  alert("<? echo $can_create_massege_Gender ?>");
							document.forms["formResume"]["gender"].focus();
						  return false;
				 
				  }
				  if (address==null || address=="")
				  {
						  alert("<? echo $can_create_massege_Address ?>");
							document.forms["formResume"]["address"].focus();
						  return false;
				 
				  }
				  if (telp==null || telp=="")
				  {
						  alert("<? echo $can_create_massege_Telephone ?>");
							document.forms["formResume"]["telp"].focus();
						  return false;
				 
				  }
				  if(!check_list_degree())
				  {
					  return false;
					  	
					}
				if(!check_list_lang())
				  {
					  return false;
					  	
					}
				if(!check_list_exp())
				  {
					  return false;
					  	
					}
					
		
				
				    if (skillsheet.length > 500 )
				  {
						  alert("<? echo $can_create_massege_Skillb ?>");
							document.forms["formResume"]["skillsheet"].focus();
						  return false;
				 
				  }
		
		}
		 //====== prerpare data ===================================
	var workstyle_option = '<?php echo $workstyle_option ?>';
	var category_option = '<?php echo $category_option ?>';
	var month_option = '<?php echo $month_option ?>';
	var year_option = '<?php echo $year_option ?>';
	
	
	//====== prepare functions =============================
	function addArea(id)
	{
		area2 = new nicEditor({fullPanel : true}).panelInstance(id);
	}
	function select_to_option(select_id,option_value)
	{
		listbox = document.getElementById(select_id); 
		for (var i = 0; i < listbox.options.length; i++) 
		{ 				
			if(listbox.options[i].value == option_value)
			{
				listbox.options[i].selected= true;
			}
		}
	}
	
	//=======================================================
</script>
		<div id="primary">
			<div id="content" role="main">
				<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
					<header class="entry-header">
						<h1 class="entry-titles"><?php echo $update_Resume_title; ?></h1>
					</header><!-- .entry-header -->
                    
                    <div class="entry-content">
                    
                    	<form id="formResume" name="formResume" action="" method="post" enctype="multipart/form-data" onsubmit="return validateForm()">
                            	
                            	<div class="entry-content ">
                            	  <table id="tb_Regis " class="secan2" cellpadding="5px">
                            	    <tr>
                            	      <td colspan="2"><h3 align="center"><?php echo $can_create_title ?></h3></td>
                          	      </tr>
                            	    <tr>
                            	      <td style="width:180px;"><?php echo $can_create_rename ?></td>
                            	      <td><input type="text" name="resumetitle" value="<?php echo $reg->Title;?>" /></td>
                          	      </tr>
                            	    <tr>
                            	      <td style="width:180px;"><?php echo $can_create_salary ?></td>
                            	      <td><input type="text" name="presalary" value="<?php echo $reg->PreferredSalary;?>" /></td>
                          	      </tr>
                            	    <tr>
                            	      <td style="width:180px;"><?php echo $can_create_name ?></td>
                            	      <td><input type="text" name="canname" value="<?php echo $reg->Name;?> " /></td>
                          	      </tr>
                            	    <tr>
                            	      <td><?php echo $can_create_gen ?></td>
                            	      <td><?php 
                                            $gen = $reg->Gender;
                                            ?>
                                           
                            	       
                                                      <input type="radio" name="gender" <?php if(trim($gen) =="Male") {?> checked="checked" <?php } ?> value="Male " />
                                                      <?php echo $can_Reg_chkgen1 ?>
                                                    <input type="radio" name="gender" <?php if(trim($gen) =="Female") {?> checked="checked" <?php } ?>   value="Female" />
                                                    <?php echo $can_Reg_chkgen2 ?>
                            	        </td>
                          	      </tr>
                            	    <tr>
                            	      <td><?php echo $can_create_birth ?></td>
                            	      <td><?php
														  
														   $strd = $reg->BirthDay;
														 $str = explode("-",$strd)
												   ?>
                            	        <select name="day2">
                            	          <option value="<?php echo $str[2];?>"><?php echo$str[2];?></option>
                            	          <option value="1">1</option>
                            	          <option value="2">2</option>
                            	          <option value="3">3</option>
                            	          <option value="4">4</option>
                            	          <option value="5">5</option>
                            	          <option value="6">6</option>
                            	          <option value="7">7</option>
                            	          <option value="8">8</option>
                            	          <option value="9">9</option>
                            	          <option value="10">10</option>
                            	          <option value="11">11</option>
                            	          <option value="12">12</option>
                            	          <option value="13">13</option>
                            	          <option value="14">14</option>
                            	          <option value="15">15</option>
                            	          <option value="16">16</option>
                            	          <option value="17">17</option>
                            	          <option value="18">18</option>
                            	          <option value="19">19</option>
                            	          <option value="20">20</option>
                            	          <option value="21">21</option>
                            	          <option value="22">22</option>
                            	          <option value="23">23</option>
                            	          <option value="24">24</option>
                            	          <option value="25">25</option>
                            	          <option value="26">26</option>
                            	          <option value="27">27</option>
                            	          <option value="28">28</option>
                            	          <option value="29">29</option>
                            	          <option value="30">30</option>
                            	          <option value="31">31</option>
                          	          </select>
                            	      
                            	        <select name="month2" >
                            	          <option value="<?php echo $str[1];?>"><?php echo $str[1];?></option>
                            	          <option value="1">1</option>
                            	          <option value="2">2</option>
                            	          <option value="3">3</option>
                            	          <option value="4">4</option>
                            	          <option value="5">5</option>
                            	          <option value="6">6</option>
                            	          <option value="7">7</option>
                            	          <option value="8">8</option>
                            	          <option value="9">9</option>
                            	          <option value="10">10</option>
                            	          <option value="11">11</option>
                            	          <option value="12">12</option>
                          	          </select>
                            	       
                            	        <select name="year2">
                            	          <option value="<?php echo $str[0]?>" selected="selected"><?php echo $str[0]?></option>
                            	          <option value="2012">2012</option>
                            	          <option value="2011">2011</option>
                            	          <option value="2010">2010</option>
                            	          <option value="2009">2009</option>
                            	          <option value="2008">2008</option>
                            	          <option value="2007">2007</option>
                            	          <option value="2006">2006</option>
                            	          <option value="2005">2005</option>
                            	          <option value="2004">2004</option>
                            	          <option value="2003">2003</option>
                            	          <option value="2002">2002</option>
                            	          <option value="2001">2001</option>
                            	          <option value="2000">2000</option>
                            	          <option value="1999">1999</option>
                            	          <option value="1998">1998</option>
                            	          <option value="1997">1997</option>
                            	          <option value="1996">1996</option>
                            	          <option value="1995">1995</option>
                            	          <option value="1994">1994</option>
                            	          <option value="1993">1993</option>
                            	          <option value="1992">1992</option>
                            	          <option value="1991">1991</option>
                            	          <option value="1990">1990</option>
                            	          <option value="1989">1989</option>
                            	          <option value="1988">1988</option>
                            	          <option value="1987">1987</option>
                            	          <option value="1986">1986</option>
                            	          <option value="1985">1985</option>
                            	          <option value="1984">1984</option>
                            	          <option value="1983">1983</option>
                            	          <option value="1982">1982</option>
                            	          <option value="1981">1981</option>
                            	          <option value="1980" >1980</option>
                            	          <option value="1979">1979</option>
                            	          <option value="1978">1978</option>
                            	          <option value="1977">1977</option>
                            	          <option value="1976">1976</option>
                            	          <option value="1975">1975</option>
                            	          <option value="1974">1974</option>
                            	          <option value="1973">1973</option>
                            	          <option value="1972">1972</option>
                            	          <option value="1971">1971</option>
                            	          <option value="1970">1970</option>
                            	          <option value="1969">1969</option>
                            	          <option value="1968">1968</option>
                            	          <option value="1967">1967</option>
                            	          <option value="1966">1966</option>
                            	          <option value="1965">1965</option>
                            	          <option value="1964">1964</option>
                            	          <option value="1963">1963</option>
                            	          <option value="1962">1962</option>
                            	          <option value="1961">1961</option>
                            	          <option value="1960">1960</option>
                            	          <option value="1959">1959</option>
                            	          <option value="1958">1958</option>
                            	          <option value="1957">1957</option>
                            	          <option value="1956">1956</option>
                            	          <option value="1955">1955</option>
                            	          <option value="1954">1954</option>
                            	          <option value="1953">1953</option>
                            	          <option value="1952">1952</option>
                            	          <option value="1951">1951</option>
                            	          <option value="1950">1950</option>
                            	          <option value="1949">1949</option>
                            	          <option value="1948">1948</option>
                            	          <option value="1947">1947</option>
                            	          <option value="1946">1946</option>
                            	          <option value="1945">1945</option>
                            	          <option value="1944">1944</option>
                            	          <option value="1943">1943</option>
                            	          <option value="1942">1942</option>
                            	          <option value="1941">1941</option>
                            	          <option value="1940">1940</option>
                            	          <option value="1939">1939</option>
                            	          <option value="1938">1938</option>
                            	          <option value="1937">1937</option>
                            	          <option value="1936">1936</option>
                            	          <option value="1935">1935</option>
                            	          <option value="1934">1934</option>
                            	          <option value="1933">1933</option>
                            	          <option value="1932">1932</option>
                            	          <option value="1931">1931</option>
                            	          <option value="1930">1930</option>
                            	          <option value="1929">1929</option>
                            	          <option value="1928">1928</option>
                            	          <option value="1927">1927</option>
                            	          <option value="1926">1926</option>
                            	          <option value="1925">1925</option>
                            	          <option value="1924">1924</option>
                            	          <option value="1923">1923</option>
                            	          <option value="1922">1922</option>
                            	          <option value="1921">1921</option>
                            	          <option value="1920">1920</option>
                            	          <option value="1919">1919</option>
                            	          <option value="1918">1918</option>
                            	          <option value="1917">1917</option>
                            	          <option value="1916">1916</option>
                            	          <option value="1915">1915</option>
                            	          <option value="1914">1914</option>
                            	          <option value="1913">1913</option>
                            	          <option value="1912">1912</option>
                            	          <option value="1911">1911</option>
                            	          <option value="1910">1910</option>
                            	          <option value="1909">1909</option>
                            	          <option value="1908">1908</option>
                            	          <option value="1907">1907</option>
                            	          <option value="1906">1906</option>
                            	          <option value="1905">1905</option>
                          	          </select></td>
                          	      </tr>
                            	    <tr>
                            	      <td><?php echo $can_create_pro ?></td>
                            	      <td><select  class="span-5plus" name="location" id="location" style="width: 258px;">
                            	        <?php
												
															foreach($resultslw as $result)
															{
													     	?>
                            	        <option value="<?php echo $result->Location ?>"><?php echo $result->Location ?></option>
                                        				<?php } ?>
                            	       
                          	        </select></td>
                          	      </tr>
                            	    <tr>
                            	      <td><?php echo $can_create_address ?></td>
                            	      <td><input type="text" name="address" value="<?php echo $reg->Address;?>" /></td>
                          	      </tr>
                            	    <tr>
                            	      <td><?php echo $can_create_tele ?></td>
                            	      <td><input type="text" name="telp" value="<?php echo $reg->Telephone;?>" /></td>
                          	      </tr>
                            	    <tr>
                            	      <td><?php echo $can_create_email ?></td>
                            	      <td><?php echo $_SESSION['userid']; ?></td>
                          	      </tr>
                            	    <tr>
                            	      <td colspan="2"><div id="req-title">
                            	        <h5><?php echo $can_create_Degree ?></h5>
                          	        </div></td>
                          	      </tr>
                                  <tr>
                                                	
                                                	<td class="tdsmall" colspan="2">
                                                    	<div id="tempinfo_degree">
                                                        
                                                        <?php

												$str_sql_degree = "select * from degree where Re_ID='".$_GET['id']."'";
												$sql_ds_degree = sql($str_sql_degree);
												$l=1;
												while($rows_degree = mysql_fetch_object($sql_ds_degree))
												{
												?>
												  <div id="info_degree<?php echo $l; ?>" class="degree_items">
									 <?php echo $can_create_fes ?><input type="text" value='<?php echo $rows_degree->schoolname ?>' id="schoolname<?php echo $l; ?>" name='schoolname<?php echo $l ?>'>
                                     <span class="delete"><a href="JavaScript:void(0);"></a>[<a href="JavaScript:void(0);" style="color:red;font-size:10px" onclick="del_degree(<?php echo $l; ?>);">X</a>]</span><br><br>
                                     <?php echo $can_create_fef ?><input type="text" value='<?php echo $rows_degree->faculty ?>' id="faculty<?php echo $l; ?>" name='faculty<?php echo $l ?>'><br><br>
                                     <?php echo $can_create_fey ?><input type="text" value='<?php echo $rows_degree->graduateyear ?>' id="graduateyear<?php echo $l; ?>" name='graduateyear<?php echo $l ?>'><br><br>
                                     <?php echo $can_create_fe ?><input type="text" value='<?php echo $rows_degree->degree ?>' id="degree<?php echo $l; ?>" name='degree<?php echo $l ?>'><br><br>
                                     <hr></div>
                                     <?php $l++; } ?>
                                                        
                                                        
                                                        </div>
                                        </td>
                                    </tr>
                                              
                            	    <tr>
                            	      <td><?php echo $can_create_fes ?></td>
                            	      <td><input type="text" name="schoolname0" id="schoolname" value="" /></td>
                          	      </tr>
                            	    <tr>
                            	      <td><?php echo $can_create_fef ?></td>
                            	      <td><input type="text" name="faculty0" id="faculty" value="" /></td>
                          	      </tr>
                            	    <tr>
                            	      <td><?php echo $can_create_fey ?></td>
                            	      <td><input type="text" name="graduateyear0" id="graduateyear" value="" /></td>
                          	      </tr>
                            	    <tr>
                            	      <td><?php echo $can_create_fe ?></td>
                            	      <td>
                                    <input type="text" name="degree0" id="degree" />
                                    
                                    </td>
                          	      </tr>
                                  <tr>
                                  <td>
                                  </td>
                                  <td>
                                  <input class="button-css green" type="button" name="add_degree" value="<?php echo $can_create_add; ?>" id="add_degree" onclick="build_list_degree()"/>
                                  </td>
                                  </tr>
                            	    <tr>
                            	      <td colspan="2"><div id="req-title">
                            	        <h5><?php echo $can_create_Skill ?></h5>
                          	        </div></td>
                          	      </tr>
                                  <tr>
                                                    <td style="vertical-align:top">
                                                      <?php echo $can_create_lang ?> </td>
                                                    <td>  
                                                  		<select name="language" id="language" style="width: 125px;"> 
                                                        	<?php include('languages.php'); ?>
                                                        </select>
                                                        &nbsp;   &nbsp;  
                                                    	<?php echo $can_create_level ?>
                                                    	<select name="lang_level" id="language_level" style="width: 124px;"> 	
                                                       <option><?php echo $can_create_lang_level_1 ?></option>
                                                        <option><?php echo $can_create_lang_level_2 ?></option>
                                                        <option><?php echo $can_create_lang_level_3 ?></option>
                                                        <option><?php echo $can_create_lang_level_4 ?></option>
                                                        </select>
                                                        <input class="button-css green" type="button" name="add_lang" value="<?php echo $can_create_add; ?>" id="add_lang" onclick="build_list_lang()"/>
                                                    </td>
                                                
                                                </tr>
                                                <tr>
                                                	<td></td>
                                                	<td class="tdsmall">
                                                    	<div id="tempinfo_lang">
                                                        
                                                        <?php

														$str_sql_lang = "select * from language where Re_ID='".$_GET['id']."'";
														$sql_ds_lang = sql($str_sql_lang);
														$m=0;
														while($rows_lang = mysql_fetch_object($sql_ds_lang))
														{
														?>
														<div id='info_lang<?php echo $m; ?>'>
															<div>
																<div>
																	<div class='trcol' id='language<?php echo $m; ?>'><?php echo $rows_lang->Name ?></div>
																	<input type='hidden' name='language<?php echo $m; ?>' value='<?php echo $rows_lang->Name ?>' />
																	<div class='tdrow wismall'  id='language_level<?php echo $m; ?>' ><?php echo $rows_lang->Level ?></div>
																	<input type='hidden' name='language_level<?php echo $m; ?>' value='<?php echo $rows_lang->Level ?>' />
																	<div>[<a onclick='del_lang(<?php echo $m; ?>);' Style='color:red;font-size:10px' href='JavaScript:void(0);' >X</a>]</div>
																</div>
															</div>
														</div>
														<?php $m++; } ?>
																												
                                                        
                                                        </div>
                                                    </td>
                                                </tr>
                            	    <tr>
                            	      <td style="vertical-align:top"><?php echo $can_create_sk ?></td>
                            	      <td>
                                      <textarea name="skillsheet" rows="7" cols="100" ><?php echo $reg->SkillSheet;?></textarea>
                                     </td>
                          	      </tr>
                                  <tr>
                         <td colspan="2">
                                <div id="req-title">
                                  <h5><?php echo $can_create_itskill ?></h5></div>
                          </td>
                    </tr>
                                  <tr>
                        
                        <td colspan="2" >
                        <?php echo $can_create_intro_itskill ;?><br/><br />
                            
                            <?php //============================================================================================== ?>
                          
                           
                            <TABLE style="border:none">
                                <TBODY>
                                    <TR> <TD colspan="10" class="skill-title-mini"> OFFICE </TD></TR>
                                    <TR>
                                        <TD  style="">
                                            
                                        </TD>
                                         <TD class="radio" style="width:56px;">
                                            N/A
                                        </TD>
                                        <TD class="radio" style="width:56px;">
                                            <?php echo $can_skillsheet_basic; ?>
                                        </TD>
                                        <TD class="radio" style="width:56px;">
                                            <?php echo $can_skillsheet_intermediate; ?>
                                        </TD>
                                        <TD class="radio" style="width:56px;">
                                            <?php echo $can_skillsheet_advanced; ?>
                                        </TD>
                                        
                                        <TD  style="">
                                            
                                        </TD>
                                         <TD class="radio" style="width:56px;">
                                            N/A
                                        </TD>
                                        <TD class="radio" style="width:56px;">
                                            <?php echo $can_skillsheet_basic; ?>
                                        </TD>
                                        <TD class="radio" style="width:56px;">
                                            <?php echo $can_skillsheet_intermediate; ?>
                                        </TD>
                                        <TD class="radio" style="width:56px;">
                                            <?php echo $can_skillsheet_advanced; ?>
                                        </TD>
                                        
                                     </TR>
                                     <TR>
                                        <TD class="skill-name">
                                            Word
                                        </TD>
                                         <TD class="radio">
                                            <input type="radio" name="Word" <?php if($reg->Word=='0'){echo'checked="checked"';} ?> value="0" />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Word" <?php if($reg->Word=='1'){echo'checked="checked"';} ?> value="1" />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Word" <?php if($reg->Word=='2'){echo'checked="checked"';} ?> value="2" />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Word" <?php if($reg->Word=='3'){echo'checked="checked"';} ?> value="3" />
                                        </TD>
                                       <TD class="skill-name">
                                            Access
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Access" <?php if($reg->Access=='0'){echo'checked="checked"';} ?> value="1" />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Access" <?php if($reg->Access=='1'){echo'checked="checked"';} ?> value="1" />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Access" <?php if($reg->Access=='2'){echo'checked="checked"';} ?> value="2" />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Access" <?php if($reg->Access=='3'){echo'checked="checked"';} ?>value="3" />
                                        </TD>
                                
                                     </TR>
                                     <TR>
                                        <TD class="skill-name">
                                            Excel
                                        </TD>
                                         <TD class="radio">
                                            <input type="radio" name="Excel" value="0" <?php if($reg->Excel=='0'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Excel" value="1" <?php if($reg->Excel=='1'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Excel" value="2" <?php if($reg->Excel=='2'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Excel" value="3" <?php if($reg->Excel=='3'){echo'checked="checked"';} ?>/>
                                        </TD>
                                       <TD class="skill-name">
                                            PowerPoint
                                        </TD>
                                         <TD class="radio">
                                            <input type="radio" name="PowerPoint" value="0" <?php if($reg->PowerPoint=='0'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="PowerPoint" value="1" <?php if($reg->PowerPoint=='1'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="PowerPoint" value="2" <?php if($reg->PowerPoint=='2'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="PowerPoint" value="3" <?php if($reg->PowerPoint=='3'){echo'checked="checked"';} ?>/>
                                        </TD>
                                     </TR>   
                                       
                                     <TR> <TD colspan="10"  class="skill-title-mini"> DESIGN </TD></TR>
                                     <TR>
                                        <TD  style="width:100px;">
                                            
                                        </TD>
                                         <TD class="radio">
                                            N/A
                                        </TD>
                                        <TD class="radio">
                                            <?php echo $can_skillsheet_basic; ?>
                                        </TD>
                                        <TD class="radio">
                                            <?php echo $can_skillsheet_intermediate; ?>
                                        </TD>
                                        <TD class="radio">
                                            <?php echo $can_skillsheet_advanced; ?>
                                        </TD>
                                        
                                        <TD  style="width:100px;">
                                            
                                        </TD>
                                        <TD class="radio">
                                            N/A
                                        </TD>
                                        <TD class="radio">
                                            <?php echo $can_skillsheet_basic; ?>
                                        </TD>
                                        <TD class="radio">
                                            <?php echo $can_skillsheet_intermediate; ?>
                                        </TD>
                                        <TD class="radio">
                                            <?php echo $can_skillsheet_advanced; ?>
                                        </TD>
                                        
                                     </TR>
                                     <TR>
                                        <TD class="skill-name">
                                            Photoshop
                                        </TD>
                                         <TD class="radio">
                                            <input type="radio" name="Photoshop" value="0" <?php if($reg->Photoshop=='0'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Photoshop" value="1" <?php if($reg->Photoshop=='1'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Photoshop" value="2" <?php if($reg->Photoshop=='2'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Photoshop" value="3" <?php if($reg->Photoshop=='3'){echo'checked="checked"';} ?> />
                                        </TD>
                                        
                                        <TD class="skill-name">
                                            Director
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Director" value="0" <?php if($reg->Director=='0'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Director" value="1" <?php if($reg->Director=='1'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Director" value="2" <?php if($reg->Director=='2'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Director" value="3" <?php if($reg->Director=='3'){echo'checked="checked"';} ?> />
                                        </TD>
                                     </TR>  
                                     <TR>
                                        <TD class="skill-name">
                                            Illustrator
                                        </TD>
                                         <TD class="radio">
                                            <input type="radio" name="Illustrator" value="0" <?php if($reg->Illustrator=='0'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Illustrator" value="1" <?php if($reg->Illustrator=='1'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Illustrator" value="2" <?php if($reg->Illustrator=='2'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Illustrator" value="3" <?php if($reg->Illustrator=='3'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="skill-name">
                                            InDesign
                                        </TD>
                                         <TD class="radio">
                                            <input type="radio" name="InDesign" value="0" <?php if($reg->InDesign=='0'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="InDesign" value="1" <?php if($reg->InDesign=='1'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="InDesign" value="2" <?php if($reg->InDesign=='2'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="InDesign" value="3" <?php if($reg->InDesign=='3'){echo'checked="checked"';} ?> />
                                        </TD>
                                     </TR>
                                     <TR>
                                        <TD class="skill-name">
                                            QuarkXpress
                                        </TD>
                                         <TD class="radio">
                                            <input type="radio" name="QuarkXpress" value="0" <?php if($reg->QuarkXpress=='0'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="QuarkXpress" value="1" <?php if($reg->QuarkXpress=='1'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="QuarkXpress" value="2" <?php if($reg->QuarkXpress=='2'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="QuarkXpress" value="3" <?php if($reg->QuarkXpress=='3'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="skill-name">
                                            HTML
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="HTML" value="0" <?php if($reg->HTML=='0'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="HTML" value="1" <?php if($reg->HTML=='1'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="HTML" value="2" <?php if($reg->HTML=='2'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="HTML" value="3" <?php if($reg->HTML=='3'){echo'checked="checked"';} ?> />
                                        </TD>
                                     </TR>
                                     <TR>
                                        <TD class="skill-name">
                                            DreamWeaver
                                        </TD>
                                         <TD class="radio">
                                            <input type="radio" name="DreamWeaver" value="0" <?php if($reg->DreamWeaver=='0'){echo'checked="checked"';} ?> / />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="DreamWeaver" value="1" <?php if($reg->DreamWeaver=='1'){echo'checked="checked"';} ?> / />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="DreamWeaver" value="2" <?php if($reg->DreamWeaver=='2'){echo'checked="checked"';} ?> / />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="DreamWeaver" value="3" <?php if($reg->DreamWeaver=='3'){echo'checked="checked"';} ?> / />
                                        </TD>
                                        <TD class="skill-name">
                                            CSS
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="CSS" value="0" <?php if($reg->CSS=='0'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="CSS" value="1" <?php if($reg->CSS=='1'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="CSS" value="2" <?php if($reg->CSS=='2'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="CSS" value="3" <?php if($reg->CSS=='3'){echo'checked="checked"';} ?> />
                                        </TD>
                                     </TR>
                                     <TR>
                                        <TD class="skill-name">
                                            FireWorks
                                        </TD>
                                          <TD class="radio">
                                            <input type="radio" name="FireWorks" value="0"  <?php if($reg->FireWorks=='0'){echo'checked="checked"';} ?>  />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="FireWorks" value="1"  <?php if($reg->FireWorks=='1'){echo'checked="checked"';} ?>  />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="FireWorks" value="2"  <?php if($reg->FireWorks=='2'){echo'checked="checked"';} ?>  />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="FireWorks" value="3"  <?php if($reg->FireWorks=='3'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="skill-name">
                                            CAD
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="CAD" value="0"   <?php if($reg->CAD=='0'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="CAD" value="1"   <?php if($reg->CAD=='1'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="CAD" value="2"  <?php if($reg->CAD=='2'){echo'checked="checked"';} ?>  />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="CAD" value="3"   <?php if($reg->CAD=='3'){echo'checked="checked"';} ?> />
                                        </TD>
                                     </TR>
                                     <TR>
                                        <TD class="skill-name">
                                            Flash
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Flash" value="0"  <?php if($reg->Flash=='0'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Flash" value="1"  <?php if($reg->Flash=='1'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Flash" value="2" <?php if($reg->Flash=='2'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Flash" value="3" <?php if($reg->Flash=='3'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="skill-name">
                                            3DCG
                                        </TD>
                                          <TD class="radio">
                                            <input type="radio" name="DCG" value="0" <?php if($reg->DCG=='0'){echo'checked="checked"';} ?>  />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="DCG" value="1" <?php if($reg->DCG=='1'){echo'checked="checked"';} ?>  />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="DCG" value="2"  <?php if($reg->DCG=='2'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="DCG" value="3" <?php if($reg->DCG=='3'){echo'checked="checked"';} ?>  />
                                        </TD>
                                     </TR>
                                      </TBODY>
                                        </TABLE>
                                     <div id="skill_sheet_table" style="display:none" >
                                      <TABLE style="border:none">
                                        <TBODY>
                                     <TR> <TD colspan="10"  class="skill-title-mini"> OS </TD></TR>
                                     <TR>
                                        <TD  style="width:100px;">
                                            
                                        </TD>
                                        <TD class="radio">
                                            N/A
                                        </TD>
                                        <TD class="radio">
                                            <?php echo $can_skillsheet_basic; ?>
                                        </TD>
                                        <TD class="radio">
                                            <?php echo $can_skillsheet_intermediate; ?>
                                        </TD>
                                        <TD class="radio">
                                            <?php echo $can_skillsheet_advanced; ?>
                                        </TD>
                                        
                                        <TD  style="width:100px;">
                                            
                                        </TD>
                                         <TD class="radio">
                                            N/A
                                        </TD>
                                        <TD class="radio">
                                            <?php echo $can_skillsheet_basic; ?>
                                        </TD>
                                        <TD class="radio">
                                            <?php echo $can_skillsheet_intermediate; ?>
                                        </TD>
                                        <TD class="radio">
                                            <?php echo $can_skillsheet_advanced; ?>
                                        </TD>
                                        
                                     </TR>
                                     <TR>
                                        <TD class="skill-name">
                                            Windows
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Windows" value="0"  <?php if($reg->Windows=='0'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Windows" value="1"  <?php if($reg->Windows=='1'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Windows" value="2" <?php if($reg->Windows=='2'){echo'checked="checked"';} ?>  />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Windows" value="3"  <?php if($reg->Windows=='3'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="skill-name">
                                            Solaris
                                        </TD>
                                          <TD class="radio">
                                            <input type="radio" name="Solaris" value="0" <?php if($reg->Solaris=='0'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Solaris" value="1" <?php if($reg->Solaris=='1'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Solaris" value="2" <?php if($reg->Solaris=='2'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Solaris" value="3" <?php if($reg->Solaris=='3'){echo'checked="checked"';} ?> />
                                        </TD>
                                     </TR>
                                     <TR>
                                        <TD class="skill-name">
                                            Mac
                                        </TD>
                                         <TD class="radio">
                                            <input type="radio" name="Mac" value="0" <?php if($reg->Mac=='0'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Mac" value="1" <?php if($reg->Mac=='1'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Mac" value="2" <?php if($reg->Mac=='2'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Mac" value="3" <?php if($reg->Mac=='3'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="skill-name">
                                            HP-UX
                                        </TD>
                                         <TD class="radio">
                                            <input type="radio" name="HPUX" value="0" <?php if($reg->HPUX=='0'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="HPUX" value="1" <?php if($reg->HPUX=='1'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="HPUX" value="2" <?php if($reg->HPUX=='2'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="HPUX" value="3" <?php if($reg->HPUX=='3'){echo'checked="checked"';} ?>/>
                                        </TD>
                                     </TR>
                                     <TR>
                                        <TD class="skill-name">
                                            Linux
                                        </TD>
                                         <TD class="radio">
                                            <input type="radio" name="Linux" value="0"  <?php if($reg->Linux=='0'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Linux" value="1"  <?php if($reg->Linux=='1'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Linux" value="2"  <?php if($reg->Linux=='2'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Linux" value="3"  <?php if($reg->Linux=='3'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="skill-name">
                                            AS400
                                        </TD>
                                         <TD class="radio">
                                            <input type="radio" name="AS400" value="0"  <?php if($reg->AS400=='0'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="AS400" value="1"  <?php if($reg->AS400=='1'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="AS400" value="2"  <?php if($reg->AS400=='2'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="AS400" value="3"  <?php if($reg->AS400=='3'){echo'checked="checked"';} ?>/>
                                        </TD>
                                     </TR>
                                     <TR>
                                        <TD class="skill-name">
                                            BSD
                                        </TD>
                                          <TD class="radio">
                                            <input type="radio" name="BSD" value="0"  <?php if($reg->BSD=='0'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="BSD" value="1"  <?php if($reg->BSD=='1'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="BSD" value="2"  <?php if($reg->BSD=='2'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="BSD" value="3"  <?php if($reg->BSD=='3'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="skill-name">
                                            NECACOS
                                        </TD>
                                         <TD class="radio">
                                            <input type="radio" name="NECACOS" value="0"  <?php if($reg->NECACOS=='0'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="NECACOS" value="1"  <?php if($reg->NECACOS=='1'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="NECACOS" value="2"  <?php if($reg->NECACOS=='2'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="NECACOS" value="3"  <?php if($reg->NECACOS=='3'){echo'checked="checked"';} ?>/>
                                        </TD>
                                     </TR>
                                     <TR> <TD colspan="10" class="skill-title-mini"> Programming </TD></TR>
                                     <TR>
                                        <TD  style="width:100px;">
                                            
                                        </TD>
                                        <TD class="radio">
                                            N/A
                                        </TD>
                                        <TD class="radio">
                                            <?php echo $can_skillsheet_basic; ?>
                                        </TD>
                                        <TD class="radio">
                                            <?php echo $can_skillsheet_intermediate; ?>
                                        </TD>
                                        <TD class="radio">
                                            <?php echo $can_skillsheet_advanced; ?>
                                        </TD>
                                        
                                        <TD  style="width:100px;">
                                            
                                        </TD>
                                         <TD class="radio">
                                            N/A
                                        </TD>
                                        <TD class="radio">
                                            <?php echo $can_skillsheet_basic; ?>
                                        </TD>
                                        <TD class="radio">
                                            <?php echo $can_skillsheet_intermediate; ?>
                                        </TD>
                                        <TD class="radio">
                                            <?php echo $can_skillsheet_advanced; ?>
                                        </TD>
                                        
                                     </TR>
                                     <TR>
                                        <TD class="skill-name">
                                            Perl
                                        </TD>
                                         <TD class="radio">
                                            <input type="radio" name="Perl" value="0"  <?php if($reg->Perl=='0'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Perl" value="1"  <?php if($reg->Perl=='1'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Perl" value="2"  <?php if($reg->Perl=='2'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Perl" value="3"  <?php if($reg->Perl=='3'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="skill-name">
                                            VisualBasic
                                        </TD>
                                         <TD class="radio">
                                            <input type="radio" name="VisualBasic" value="0"  <?php if($reg->VisualBasic=='0'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="VisualBasic" value="1"  <?php if($reg->VisualBasic=='1'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="VisualBasic" value="2" <?php if($reg->VisualBasic=='2'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="VisualBasic" value="3" <?php if($reg->VisualBasic=='3'){echo'checked="checked"';} ?> />
                                        </TD>
                                     </TR>
                                     <TR>
                                        <TD class="skill-name">
                                            PHP
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="PHP" value="0"  <?php if($reg->PHP=='0'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="PHP" value="1"  <?php if($reg->PHP=='1'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="PHP" value="2"  <?php if($reg->PHP=='2'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="PHP" value="3" <?php if($reg->PHP=='3'){echo'checked="checked"';} ?>  />
                                        </TD>
                                        <TD class="skill-name">
                                            Delphi
                                        </TD>
                                         <TD class="radio">
                                            <input type="radio" name="Delphi" value="0" <?php if($reg->Delphi=='0'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Delphi" value="1" <?php if($reg->Delphi=='1'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Delphi" value="2" <?php if($reg->Delphi=='2'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Delphi" value="3" <?php if($reg->Delphi=='3'){echo'checked="checked"';} ?> />
                                        </TD>
                                     </TR>
                                     <TR>
                                        <TD class="skill-name">
                                            Python
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Python" value="0" <?php if($reg->Python=='0'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Python" value="1" <?php if($reg->Python=='1'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Python" value="2" <?php if($reg->Python=='2'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Python" value="3" <?php if($reg->Python=='3'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="skill-name">
                                            COBOL
                                        </TD>
                                         <TD class="radio">
                                            <input type="radio" name="COBOL" value="0" <?php if($reg->COBOL=='0'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="COBOL" value="1" <?php if($reg->COBOL=='1'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="COBOL" value="2" <?php if($reg->COBOL=='2'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="COBOL" value="3" <?php if($reg->COBOL=='3'){echo'checked="checked"';} ?> />
                                        </TD>
                                     </TR>
                                     <TR>
                                        <TD class="skill-name">
                                            Ruby
                                        </TD>
                                          <TD class="radio">
                                            <input type="radio" name="Ruby" value="0"  <?php if($reg->Ruby=='0'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Ruby" value="1"  <?php if($reg->Ruby=='1'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Ruby" value="2"  <?php if($reg->Ruby=='2'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Ruby" value="3"  <?php if($reg->Ruby=='3'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="skill-name">
                                            Javascript
                                        </TD>
                                         <TD class="radio">
                                            <input type="radio" name="Javascript" value="0"  <?php if($reg->Javascript=='0'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Javascript" value="1"  <?php if($reg->Javascript=='1'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Javascript" value="2"  <?php if($reg->Javascript=='2'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Javascript" value="3"  <?php if($reg->Javascript=='3'){echo'checked="checked"';} ?>/>
                                        </TD>
                                     </TR>
                                     <TR>
                                        <TD class="skill-name">
                                            ASP
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="ASP" value="0"  <?php if($reg->ASP=='0'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="ASP" value="1"  <?php if($reg->ASP=='1'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="ASP" value="2"  <?php if($reg->ASP=='2'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="ASP" value="3"  <?php if($reg->ASP=='3'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="skill-name">
                                            ActionScript
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="ActionScript" value="0" <?php if($reg->ActionScript=='0'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="ActionScript" value="1" <?php if($reg->ActionScript=='1'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="ActionScript" value="2"  <?php if($reg->ActionScript=='2'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="ActionScript" value="3"  <?php if($reg->ActionScript=='3'){echo'checked="checked"';} ?>/>
                                        </TD>
                                     </TR>
                                     <TR>
                                        <TD class="skill-name">
                                            JSP
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="JSP" value="0"  <?php if($reg->JSP=='0'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="JSP" value="1"  <?php if($reg->JSP=='1'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="JSP" value="2"  <?php if($reg->JSP=='2'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="JSP" value="3"  <?php if($reg->JSP=='3'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="skill-name">
                                            XML
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="XML" value="0" <?php if($reg->XML=='0'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="XML" value="1" <?php if($reg->XML=='1'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="XML" value="2" <?php if($reg->XML=='2'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="XML" value="3" <?php if($reg->XML=='3'){echo'checked="checked"';} ?>/>
                                        </TD>
                                     </TR>
                                     <TR>
                                        <TD class="skill-name">
                                            C
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="C" value="0" <?php if($reg->C=='0'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="C" value="1" <?php if($reg->C=='1'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="C" value="2"  <?php if($reg->C=='2'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="C" value="3"  <?php if($reg->C=='3'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="skill-name">
                                            ABAP/4
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="ABAP4" value="0"  <?php if($reg->ABAP4=='0'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="ABAP4" value="1"  <?php if($reg->ABAP4=='1'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="ABAP4" value="2"  <?php if($reg->ABAP4=='2'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="ABAP4" value="3"  <?php if($reg->ABAP4=='3'){echo'checked="checked"';} ?>/>
                                        </TD>
                                     </TR>
                                     <TR>
                                        <TD class="skill-name">
                                            C++
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="CPP" value="0" <?php if($reg->CPP=='0'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="CPP" value="1" <?php if($reg->CPP=='1'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="CPP" value="2" <?php if($reg->CPP=='2'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="CPP" value="3" <?php if($reg->CPP=='3'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="skill-name">
                                            BREW
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="BREW" value="0" <?php if($reg->BREW=='0'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="BREW" value="1" <?php if($reg->BREW=='1'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="BREW" value="2" <?php if($reg->BREW=='2'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="BREW" value="3"  <?php if($reg->BREW=='3'){echo'checked="checked"';} ?>/>
                                        </TD>
                                     </TR>
                                     <TR>
                                        <TD class="skill-name">
                                            C#
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="CS" value="0"  <?php if($reg->CS=='0'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="CS" value="1"  <?php if($reg->CS=='1'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="CS" value="2"  <?php if($reg->CS=='2'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="CS" value="3"  <?php if($reg->CS=='3'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="skill-name">
                                            RPG
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="RPG" value="0"  <?php if($reg->RPG=='0'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="RPG" value="1"  <?php if($reg->RPG=='1'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="RPG" value="2"  <?php if($reg->RPG=='2'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="RPG" value="3"  <?php if($reg->RPG=='3'){echo'checked="checked"';} ?>/>
                                        </TD>
                                     </TR>
                                     <TR>
                                        <TD class="skill-name">
                                            Java
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Java" value="0"  <?php if($reg->Java=='0'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Java" value="1"  <?php if($reg->Java=='1'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Java" value="2"  <?php if($reg->Java=='2'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Java" value="3"  <?php if($reg->Java=='3'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="skill-name">
                                            Pascal
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Pascal" value="0"  <?php if($reg->Pascal=='0'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Pascal" value="1"  <?php if($reg->Pascal=='1'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Pascal" value="2"  <?php if($reg->Pascal=='2'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Pascal" value="3"  <?php if($reg->Pascal=='3'){echo'checked="checked"';} ?>/>
                                        </TD>
                                     </TR>
                                     <TR> <TD colspan="10" class="skill-title-mini"> Database </TD></TR>
                                     <TR>
                                        <TD  style="width:100px;">
                                            
                                        </TD>
                                        <TD class="radio">
                                            N/A
                                        </TD>
                                        <TD class="radio">
                                            <?php echo $can_skillsheet_basic; ?>
                                        </TD>
                                        <TD class="radio">
                                            <?php echo $can_skillsheet_intermediate; ?>
                                        </TD>
                                        <TD class="radio">
                                            <?php echo $can_skillsheet_advanced; ?>
                                        </TD>
                                        
                                        <TD  style="width:100px;">
                                            
                                        </TD>
                                        <TD class="radio">
                                            N/A
                                        </TD>
                                        <TD class="radio">
                                            <?php echo $can_skillsheet_basic; ?>
                                        </TD>
                                        <TD class="radio">
                                            <?php echo $can_skillsheet_intermediate; ?>
                                        </TD>
                                        <TD class="radio">
                                            <?php echo $can_skillsheet_advanced; ?>
                                        </TD>
                                        
                                     </TR>
                                     <TR>
                                        <TD class="skill-name">
                                            Oracle
                                        </TD>
                                         <TD class="radio">
                                            <input type="radio" name="Oracle" value="0"  <?php if($reg->Oracle=='0'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Oracle" value="1"  <?php if($reg->Oracle=='1'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Oracle" value="2"  <?php if($reg->Oracle=='2'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Oracle" value="3"  <?php if($reg->Oracle=='3'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="skill-name">
                                            SQLServer
                                        </TD>
                                         <TD class="radio">
                                            <input type="radio" name="SQLServer" value="0" <?php if($reg->SQLServer=='0'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="SQLServer" value="1" <?php if($reg->SQLServer=='1'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="SQLServer" value="2" <?php if($reg->SQLServer=='2'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="SQLServer" value="3" <?php if($reg->SQLServer=='3'){echo'checked="checked"';} ?>/>
                                        </TD>
                                     </TR>
                                     <TR>
                                        <TD class="skill-name">
                                            DB2
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="DB2" value="0" <?php if($reg->DB2=='0'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="DB2" value="1" <?php if($reg->DB2=='1'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="DB2" value="2" <?php if($reg->DB2=='2'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="DB2" value="3" <?php if($reg->DB2=='3'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="skill-name">
                                            PostgreSQL
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="PostgreSQL" value="0" <?php if($reg->PostgreSQL=='0'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="PostgreSQL" value="1" <?php if($reg->PostgreSQL=='1'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="PostgreSQL" value="2" <?php if($reg->PostgreSQL=='2'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="PostgreSQL" value="3" <?php if($reg->PostgreSQL=='3'){echo'checked="checked"';} ?>/>
                                        </TD>
                                     </TR>
                                     <TR>
                                        <TD class="skill-name">
                                            Sybase
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Sybase" value="0"  <?php if($reg->Sybase=='0'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Sybase" value="1"  <?php if($reg->Sybase=='1'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Sybase" value="2"  <?php if($reg->Sybase=='2'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="Sybase" value="3"  <?php if($reg->Sybase=='3'){echo'checked="checked"';} ?>/>
                                        </TD>
                                        <TD class="skill-name">
                                            MySQL
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="MySQL" value="0"  <?php if($reg->MySQL=='0'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="MySQL" value="1"  <?php if($reg->MySQL=='1'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="MySQL" value="2" <?php if($reg->MySQL=='2'){echo'checked="checked"';} ?> />
                                        </TD>
                                        <TD class="radio">
                                            <input type="radio" name="MySQL" value="3"  <?php if($reg->MySQL=='3'){echo'checked="checked"';} ?>/>
                                        </TD>
                                     </TR>
                                     <TR> <TD colspan="10" class="skill-title-mini"> Others </TD></TR>
                                     <TR> <td colspan="2" ></td> <TD colspan="8" > <div style=""><textarea name="otherskill" rows="7"  style="width:350px; height:200px" id="otherskill"><?php echo $reg->OtherSkill ?></textarea></div></TD></TR>
                                    
                                </TBODY>
                                </TABLE>
                                </div>
                                <br />
                                 <input id="open_skill_sheet" type="button" value="More"  class="right" /><br />
                                
                            <?php //============================================================================================== ?> 
                        </td>
                    </tr>
                                  <tr>
                            	      <td colspan="2"><div id="req-title">
                            	        <h5><?php echo $can_create_Work ?></h5>
                          	        </div></td>
                          	      </tr>
                                  <tr>
                                  	
                                    <td colspan="2">
                                    	 <div id ="tempinfo">
                                         <?php //============================ Experience ================================ 
										$sql_string_exp= "select * from experience where Re_ID='".$_GET['id']."'";
										$sql_ds_exp=sql($sql_string_exp);
										$i=1;
										while($rows_exp=mysql_fetch_object($sql_ds_exp))
										{
									 ?>
									<div id='info<?php echo $i ?>' class='experience_items'>
                                        <div class='row3'>
                                            <div class='trcol' ><?php echo $can_create_comname ?>: </div>
                                            <input type='text' name='comname<?php echo $i ?>' value='<?php echo $rows_exp->CompanyName ?>' />
                                            <div class='delefix' >[<a onclick='del(<?php echo $i ?>);' Style='color:red;font-size:10px' href='JavaScript:void(0);' >X</a>]</div>
                                        </div>
                                        <div class='row3'>
                                            <div class='trcol'><?php echo $can_create_start ?>(mm/yyyy): </div>        
                                            <select id='start_month<?php echo $i ?>' name='start_month<?php echo $i ?>'><?php echo $month_option; ?></select>
                                            <select id='start_year<?php echo $i ?>' name='start_year<?php echo $i ?>'><?php echo $year_option; ?></select>
                                        </div>
                                        <div class='row3'>
                                            <div class='trcol'><?php echo $can_create_end ?>(mm/yyyy): </div>
                                            <select id='end_month<?php echo $i ?>' name='end_month<?php echo $i ?>'><?php echo $month_option; ?></select>
                                            <select id='end_year<?php echo $i ?>' name='end_year<?php echo $i ?>'><?php echo $year_option; ?></select>
                                        </div>
                                        <div class='row3'>
                                            <div class='trcol'><?php echo $can_create_jobcate ?>: </div>
                                            <select class='list_exp_select' name='jobcat<?php echo $i ?>' id='jobcat_select<?php echo $i ?>'><?php echo $category_option; ?></select>
                                        </div>
                                        <div class='row3'>
                                            <div class='trcol'><?php echo $can_create_workstyle ?>: </div>
                                            <select class='list_exp_select' name='workstyle<?php echo $i ?>' id='workstyle_select<?php echo $i ?>'><?php echo $workstyle_option; ?></select>
                                        </div>
                                        <div class='row3'>
                                            <div class='trcol'><?php echo $can_create_detail ?> : </div>
                                            <div style='clear:both;padding-left: 190px;'><textarea name='detail<?php echo $i ?>' id='detail_ta<?php echo $i ?>'><?php echo $rows_exp->Detail ?></textarea></div><br>
                                            <div class='clear'></div>
                                        </div>
                                        <div class='row3'><div class='hide-line'></div>
                                        </div>
                                    </div>
                                    <?php 
                                        $startdate = explode("/",$rows_exp->StartDate); 
                                        $enddate = explode("/",$rows_exp->EndDate); 		
                                    ?>
                                    <script>
                                        select_to_option('start_month<?php echo $i ?>','<?php echo $startdate[0] ?>');
                                        select_to_option('start_year<?php echo $i ?>','<?php echo $startdate[1] ?>');
                                        select_to_option('end_month<?php echo $i ?>','<?php echo $enddate[0] ?>');
                                        select_to_option('end_year<?php echo $i ?>','<?php echo $enddate[1] ?>');
                                        select_to_option('jobcat_select<?php echo $i ?>','<?php echo $rows_exp->JobCategory ?>');
                                        select_to_option('workstyle_select<?php echo $i ?>',<?php echo $rows_exp->Workstyle ?>);
                                    </script>
									<?php $i++; } 

										//======================================================================================
										?>
                                    	 </div>
                                     </td>
                                  </tr>
                            	  <tr>
                                                    <td>
                                                      <?php echo $can_create_comname ?></td>
                                                    <td>
                                                        <input type="text" name="comname0" id="comname" class="text" value="" />
                                                    </td>
                                                
                                                </tr>
                                                
                                                
                                                 <tr>
                                                        <td>
                                                       <?php echo $can_create_start ?>(mm/YY)</td>
                                                        <td><select name="start_month0" id="startmonth" >
                                                          <option value="1">1</option>
                                                          <option value="2">2</option>
                                                          <option value="3">3</option>
                                                          <option value="4">4</option>
                                                          <option value="5">5</option>
                                                          <option value="6">6</option>
                                                          <option value="7">7</option>
                                                          <option value="8">8</option>
                                                          <option value="9">9</option>
                                                          <option value="10">10</option>
                                                          <option value="11">11</option>
                                                          <option value="12">12</option>
                                                        </select>
                                                          <select name="start_year0" id="startyear">
                                                            <option value="2012">2012</option>
                                                            <option value="2011">2011</option>
                                                            <option value="2010">2010</option>
                                                            <option value="2009">2009</option>
                                                            <option value="2008">2008</option>
                                                            <option value="2007">2007</option>
                                                            <option value="2006">2006</option>
                                                            <option value="2005">2005</option>
                                                            <option value="2004">2004</option>
                                                            <option value="2003">2003</option>
                                                            <option value="2002">2002</option>
                                                            <option value="2001">2001</option>
                                                            <option value="2000">2000</option>
                                                            <option value="1999">1999</option>
                                                            <option value="1998">1998</option>
                                                            <option value="1997">1997</option>
                                                            <option value="1996">1996</option>
                                                            <option value="1995">1995</option>
                                                            <option value="1994">1994</option>
                                                            <option value="1993">1993</option>
                                                            <option value="1992">1992</option>
                                                            <option value="1991">1991</option>
                                                            <option value="1990">1990</option>
                                                            <option value="1989">1989</option>
                                                            <option value="1988">1988</option>
                                                            <option value="1987">1987</option>
                                                            <option value="1986">1986</option>
                                                            <option value="1985">1985</option>
                                                            <option value="1984">1984</option>
                                                            <option value="1983">1983</option>
                                                            <option value="1982">1982</option>
                                                            <option value="1981">1981</option>
                                                            <option value="1980">1980</option>
                                                       
                                                        </select></td>
                                                      
                                                  </tr>
                                                
                                                <tr>
                                                    <td>
                                                      <?php echo $can_create_end ?>(mm/YY)</td>
                                                    <td><select name="end_month0" id="endmonth">
                                                      <option value="1">1</option>
                                                      <option value="2">2</option>
                                                      <option value="3">3</option>
                                                      <option value="4">4</option>
                                                      <option value="5">5</option>
                                                      <option value="6">6</option>
                                                      <option value="7">7</option>
                                                      <option value="8">8</option>
                                                      <option value="9">9</option>
                                                      <option value="10">10</option>
                                                      <option value="11">11</option>
                                                      <option value="12">12</option>
                                                    </select>
                                                      <select name="end_year0" id="endyear">
                                                        <option value="2012">2012</option>
                                                        <option value="2011">2011</option>
                                                        <option value="2010">2010</option>
                                                        <option value="2009">2009</option>
                                                        <option value="2008">2008</option>
                                                        <option value="2007">2007</option>
                                                        <option value="2006">2006</option>
                                                        <option value="2005">2005</option>
                                                        <option value="2004">2004</option>
                                                        <option value="2003">2003</option>
                                                        <option value="2002">2002</option>
                                                        <option value="2001">2001</option>
                                                        <option value="2000">2000</option>
                                                        <option value="1999">1999</option>
                                                        <option value="1998">1998</option>
                                                        <option value="1997">1997</option>
                                                        <option value="1996">1996</option>
                                                        <option value="1995">1995</option>
                                                        <option value="1994">1994</option>
                                                        <option value="1993">1993</option>
                                                        <option value="1992">1992</option>
                                                        <option value="1991">1991</option>
                                                        <option value="1990">1990</option>
                                                        <option value="1989">1989</option>
                                                        <option value="1988">1988</option>
                                                        <option value="1987">1987</option>
                                                        <option value="1986">1986</option>
                                                        <option value="1985">1985</option>
                                                        <option value="1984">1984</option>
                                                        <option value="1983">1983</option>
                                                        <option value="1982">1982</option>
                                                        <option value="1981">1981</option>
                                                        <option value="1980" >1980</option>
                                                   
                                                    </select></td>
                                                
                                                </tr>  
                                                
                                                <tr>
                                                    <td >
                                                     <?php echo $can_create_jobcate ?></td>
                                                    <td>
                                                        <select  class="span-5plus" name="jobcat0" style="width: 258px;" id="jobcat">
                                                                       <option selected="" value=""><?php echo $can_Reg_resitext ?></option>
                                                                         <?php
															foreach($resultsc as $result)
															{
															?>
															<option selected="selected" value="<?php echo $result->CategoryName ?>"><?php echo $result->CategoryName ?></option>
															<?php }?> 
                                                        </select>
                                                    </td>
                                                
                                                </tr>
                                                 <tr>
                                                    <td>
                                                      <?php echo $can_create_workstyle ?></td>
                                                    <td>
                                                        <select  class="span-5plus" name="workstyle0" style="width: 258px;" id="workstyle">
                                                            <option selected="" value=""><?php echo $can_Reg_resitext ?></option>
                                                         	<?php 
														  $sql_ds_workstyle=sql("select * from workstyle");
														  while($rows_workstyle=mysql_fetch_object($sql_ds_workstyle))
														  {
														   ?>
                                                          <option value="<?php echo $rows_workstyle->workstyle; ?>"><?php echo my_translate('workstyle','workstyle',$rows_workstyle->workstyle); ?>
                                                          </option>
                                                          
                                                          <?php } ?>
                                                        </select>
                                                    </td>
                                                
                                                </tr>
                                                 <tr>
                                                    <td style="vertical-align:top">
                                                      <?php echo $can_create_detail ?></td>
                                                    <td><textarea name="detail0" rows="7" cols="100" id="detail" ></textarea></td>
                                                
                                                </tr>
                                                <tr>
                                                    <td ></td>
                                                    <td align="right"> <input class="button-css green" type="button" name="add" value="<?php echo $can_create_add; ?>" id="add" onclick="build_list_exp()"/></td>
                                                
                                                </tr>
                                      <tr>
                                                     <td colspan="2">
                                                            <div id="req-title">
                                                              <h5><?php echo $can_create_Other ?></h5></div>
                                                      </td>
                                                </tr>
                            	    <tr>
                            	      <td style="vertical-align:top"><?php echo $can_create_pro2 ?></td>
                            	      <td><textarea name="selfpro" rows="7" cols="100" ><?php echo $reg->SelfPromotion;?></textarea></td>
                          	      </tr>
                            	    <tr>
                            	      <td><?php echo $can_create_scount ?></td>
                            	      <td>
                                      <?php 
                                            $gen = $reg->ScountMail;
                                            
                                            if(	trim($gen) =="Yes")
                                            {
                                            ?>
                            	      <input type="radio" name="scount" checked="checked"  value="Yes " />
                            	      <?php echo $can_create_yes ?>
                            	      <input type="radio" name="scount"   value="No" />
                            	      <?php echo $can_create_no ?>
                            	      <?php }elseif(trim($gen) =="No"){?>
                            	       <input type="radio" name="scount"  value="Yes " />
                            	       <?php echo $can_create_yes ?>
                            	       <input type="radio" name="scount" checked="checked" value="No" />
                            	       <?php echo $can_create_no ?>                            	       <?php } ?>
                                      
                                     </td>
                          	      </tr>
                            	    <tr>
                            	      <td><h3><?php echo $can_create_CV ?></h3></td>
                            	      <td><input type="file" name="file" id="file" />
                                      <br />
                                                    	<?php echo $can_create_CVmasage ?></td>
                          	      </tr>
                            	    <tr>
                            	      <td></td>
                            	      <td><input class="button-css green" type="submit" name="submit" value="<?php echo $finish ; ?>" id="btnSubmit"/></td>
                          	      </tr>
                          	    </table>
                          	  </div>
                              <input type="hidden" id="i" name="i" value="" />
                                <input type="hidden" id="j" name="j" value=""/>
                                <input type="hidden" id="l" name="l" value="" />
                        </form>

				
					
					</div><!-- .entry-content -->
				</article><!-- #post-<?php the_ID(); ?> -->
				

			</div><!-- #content -->
		</div><!-- #primary -->
<?php /*echo'<script> update_k(); </script>';*/  ?>
<script>
 

 
 
 
 
	var o_location = new Object();
	o_location.list = Array();
	var str_a= "";
	var l = <?php echo $l ?>+1;
	var k = <?php echo $i ?>+1;
	var m = <?php echo $m ?>+1;
	function update_m()
	{
		m = <?php echo $m ?>;
	}
	function update_k()
	{
		k = <?php echo $i ?>;
	}
	document.getElementById("j").value=m;
	document.getElementById("i").value=k;
	document.getElementById("l").value=l;
	function getlocation(str)
	{
		o_location.list[o_location.list.length]=str;
		
		str_a += o_location.list[o_location.list.length-1]+" , ";
		document.getElementById("location").innerHTML=str_a;
		document.getElementById("my_location").value=str_a;
		//alert(str_array);
	}
	function build_list_degree(){
		var schoolname =document.getElementById("schoolname").value;
		var faculty =document.getElementById("faculty").value;
		var graduateyear =document.getElementById("graduateyear").value;
		var degree =document.getElementById("degree").value;
		
		if(schoolname == "" && faculty == "" && graduateyear == "" && degree == ""){			
			return;	
		}
		if(schoolname == ""){
			return;	
		}
		if(faculty == ""){
			return;	
		}
		if(graduateyear == ""){
			return;	
		}
		if(degree == ""){
			return;	
		}
		//================ Old =========================
		//var str_degree ="<div id='info_degree"+l+"'><div><div class='trcol' ><?php echo $can_create_fes ?>: </div><div class='tdrow'><div class='contentb comnamefix' id='schoolname"+l+"'>"+schoolname+"</div><input type='hidden' name='schoolname"+l+"' value='"+schoolname+"' /><div class='delefix' >[<a onclick='del_degree("+l+");' Style='color:red;font-size:10px' href='JavaScript:void(0);' >X</a>]</div></div></div><div><div class='trcol'><?php echo $can_create_fef ?>: </div><div class='tdrow'  id='faculty"+l+"' >"+faculty+"</div><input type='hidden' name='faculty"+l+"' value='"+faculty+"' /></div><div><div class='trcol'><?php echo $can_create_fey ?>: </div><div class='tdrow'  id='graduateyear"+l+"'  >"+graduateyear+"</div><input type='hidden' name='graduateyear"+l+"' value='"+graduateyear+"' /></div><div><div class='trcol'><?php echo $can_create_fe ?>: </div><div class='tdrow'  id='degree"+l+"' >"+degree+"</div><input type='hidden' name='degree"+l+"' value='"+degree+"'/></div></div><br>" ;
		//$("#tempinfo_degree").append(str_degree);
		//================ New =========================
		var str_degree_test ='<div class="degree_items" id="info_degree'+l+'"><?php echo $can_create_fes ?><input type="text" name="schoolname'+l+'" id="schoolname'+l+'" value="'+schoolname+'" /><span class="delete"><a  href="JavaScript:void(0);"></a>[<a onclick="del_degree('+l+');" Style="color:red;font-size:10px" href="JavaScript:void(0);" >X</a>]</span><br><br><?php echo $can_create_fef ?><input type="text" name="faculty'+l+'" id="faculty'+l+'" value="'+faculty+'" /><br><br><?php echo $can_create_fey ?><input type="text" name="graduateyear'+l+'" id="graduateyear'+l+'" value="'+graduateyear+'" /><br><br><?php echo $can_create_fe ?><input type="text" name="degree'+l+'" id="degree'+l+'" value="'+degree+'" /><br><br><hr></div>';

		$("#tempinfo_degree").append(str_degree_test);
		//==============================================
		l++;
		
		document.getElementById("l").value=l;
		
		
		document.getElementById("schoolname").value="";
		document.getElementById("faculty").value="";
		document.getElementById("graduateyear").value="";
		document.getElementById("degree").value="";
		
	}
	function build_list_lang(){
		var language =document.getElementById("language").value;
		var language_level =document.getElementById("language_level").value;
		var lang_str = "<div id='info_lang"+m+"'><div><div><div class='trcol' id='language"+m+"'>"+language+"</div><input type='hidden' name='language"+m+"' value='"+language+"' /> <div class='tdrow wismall'  id='language_level"+m+"' >"+language_level+"</div><input type='hidden' name='language_level"+m+"' value='"+language_level+"' /><div>[<a onclick='del_lang("+m+");' Style='color:red;font-size:10px' href='JavaScript:void(0);' >X</a>]</div></div></div></div>";
		$("#tempinfo_lang").append(lang_str);
		
		
		m++;
		document.getElementById("j").value=m;
	}
	function build_list_exp(){
		var comname=document.getElementById("comname").value;
		var startdate = document.getElementById("startmonth").value +"/"+ document.getElementById("startyear").value;
		var enddate =  document.getElementById("endmonth").value +"/"+ document.getElementById("endyear").value;
		var jobcat = document.getElementById("jobcat").value;
		var selectedIndex_jobcat = document.getElementById("jobcat").selectedIndex;
		var workstyle = document.getElementById("workstyle").value;
		var selectedIndex = document.getElementById("workstyle").selectedIndex;
		var workstyle_text = document.getElementById("workstyle").options[selectedIndex].text;
		if(comname == ""){
			return;	
		}
		if (selectedIndex_jobcat==0){
			return ;
		}
		if (selectedIndex==0){
			return ;
		}
		var detail = nicEditors.findEditor('detail').getContent();
		nicEditors.findEditor('detail').setContent("");
		
		/*if(comname == ""){
			return;	
		}*/
		var str ="<div id='info"+k+"'><div><div class='trcol' ><?php echo $can_create_comname ?>: </div><div class='tdrow'><div class='contentb comnamefix' id='comname"+k+"'>"+comname+"</div><input type='hidden' name='comname"+k+"' value='"+comname+"' /><div class='delefix' >[<a onclick='del("+k+");' Style='color:red;font-size:10px' href='JavaScript:void(0);' >X</a>]</div></div></div><div><div class='trcol'><?php echo $can_create_start ?>: </div><div class='tdrow'  id='startdate"+k+"' >"+startdate+"</div> <input type='hidden' name='startdate"+k+"' value='"+startdate+"' /></div><div><div class='trcol'><?php echo $can_create_end ?>: </div><div class='tdrow'  id='enddate"+k+"'  >"+enddate+"</div><input type='hidden' name='enddate"+k+"' value='"+enddate+"' /></div><div><div class='trcol'><?php echo $can_create_jobcate ?>: </div><div class='tdrow'  id='jobcat"+k+"' >"+jobcat+"</div><input type='hidden' name='jobcat"+k+"' value='"+jobcat+"'/></div><div><div class='trcol'><?php echo $can_create_workstyle ?>: </div><div class='tdrow'  id='workstyle"+k+"'>"+workstyle_text+"</div><input type='hidden' name='workstyle"+k+"' value='"+workstyle+"'/></div><div><div class='trcol'> <?php echo $can_create_detail ?> : </div><div class='tdrow detailjob'  id='detail"+k+"'>"+detail+"</div><input type='hidden' name='detail"+k+"' value='"+detail+"' /></div></br></div>" ;
		$("#tempinfo").append(str);
		
		
		document.getElementById("comname").value="";
		document.getElementById("startmonth").value=""
		document.getElementById("startyear").value="";
		document.getElementById("endmonth").value="";
		document.getElementById("endyear").value="";
		document.getElementById("jobcat").value="";
		document.getElementById("workstyle").value="";
		document.getElementById("detail").value="";
		
		k++;
		document.getElementById("i").value=k;
	}
	function del(id)
	{
		 $("#info" + id).remove();		  
	}
	function del_lang(id)
	{
		 $("#info_lang" + id).remove();		  
	}
	function del_degree(id)
	{
		 $("#info_degree" + id).remove();
		  
	}
	function get_location(){
		var str="";
		$('[name=list_location]').each(function(){
				str += $(this).attr('value') + ", ";
		});
		document.getElementById("my_location").value=str;
		return str;
	}
	 select_to_option('location','<?php echo $reg->Province ?>');
</script>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
      